package com.hqhsc.module.log.dao;

import com.hqhsc.core.dao.BaseJdbcDaoImpl;
import com.hqhsc.module.login.domain.User;
import com.hqhsc.module.login.domain.UserRowMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Repository;


@Repository
public class LogDao extends BaseJdbcDaoImpl {
	final Logger logger = LoggerFactory.getLogger(LogDao.class);

	public int insertLog(long user_id , String operate_desc , String operate_content) {
		String sql = "insert into sys_log (operater_id , operate_desc , operate_content ) value (?,?,?) ";
		Object[] o = new Object[] { user_id , operate_desc , operate_content };
		logger.info(sql.replaceAll("\\?", "{}"), o);
	    return this.getJdbcTemplate().update(sql, o);
	}
}
